package com.healthcloud.service.patient.impl;

import com.healthcloud.dao.patient.BoneLooseDrugDao;
import com.healthcloud.entity.patient.BoneLooseDrugEntity;
import com.healthcloud.service.patient.BoneLooseDrugService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;



@Service("boneLooseDrugService")
@Transactional
public class BoneLooseDrugServiceImpl implements BoneLooseDrugService {
	@Autowired
	private BoneLooseDrugDao boneLooseDrugDao;
	
	@Override
	public BoneLooseDrugEntity queryObject(Integer id){
		return boneLooseDrugDao.queryObject(id);
	}
	
	@Override
	public List<BoneLooseDrugEntity> queryList(BoneLooseDrugEntity bean, PageParam pageParam){
		return boneLooseDrugDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(BoneLooseDrugEntity bean){
		return boneLooseDrugDao.queryTotal(bean);
	}
	
	@Override
	public void save(BoneLooseDrugEntity boneLooseDrug){
		boneLooseDrugDao.save(boneLooseDrug);
	}
	
	@Override
	public void update(BoneLooseDrugEntity boneLooseDrug){
		boneLooseDrugDao.update(boneLooseDrug);
	}
	
	@Override
	public void delete(Integer id){
		boneLooseDrugDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		boneLooseDrugDao.deleteBatch(ids);
	}

	@Override
	public void saveOrUpdate(BoneLooseDrugEntity entity) {
		if (entity.getId()==null){
			boneLooseDrugDao.save(entity);
		}else {
			boneLooseDrugDao.update(entity);
		}
	}

	@Override
	public void deleteByCheckId(Integer id) {
		boneLooseDrugDao.deleteByCheckId(id);
	}

}
